'''Collection of utility functions'''

import hashlib
import os

def filehash(path):
   inFile = file(path, 'r')
   md5 = hashlib.md5()

   while 1:
      fileBuf = inFile.read(1024)
      if not fileBuf:
         break
      md5.update(fileBuf)
   return md5.hexdigest()
